package com.itheima.HomeWork.homework.exer;

public class Hero {
    private String name;
    private int health;
    private int attack;
    private int effect;
    private double score;


    public Hero() {
    }

    public Hero(String name, int health, int attack, int effect) {
        this.name = name;
        this.health = health;
        this.attack = attack;
        this.effect = effect;
        this.score = health*0.5+attack*0.2+effect*0.3;
    }

    @Override
    public String toString() {
        return "Hero{" +
                "name='" + name + '\'' +
                ", health=" + health +
                ", attack=" + attack +
                ", effect=" + effect +
                ", score=" + score +
                '}';
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getHealth() {
        return health;
    }

    public void setHealth(int health) {
        this.health = health;
    }

    public int getAttack() {
        return attack;
    }

    public void setAttack(int attack) {
        this.attack = attack;
    }

    public int getEffect() {
        return effect;
    }

    public void setEffect(int effect) {
        this.effect = effect;
    }

    public double getScore() {
        return score;
    }

    public void setScore(double score) {
        this.score = score;
    }
}
